package com.service.imp;

import com.mapper.TeacherMapper_db;
import com.pojo.Teacher_db;
import com.service.TeacherService_db;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImp_db implements TeacherService_db {

    @Autowired
    private TeacherMapper_db teacherMapperDb;

    @Override
    public List<Teacher_db> list(String name,Integer del) {
        return teacherMapperDb.list(name,del);
    }

    @Override
    public List<Teacher_db> listAll() {
        return teacherMapperDb.listAll();
    }

    @Override
    public Teacher_db findById(Integer id) {
        return teacherMapperDb.findById(id);
    }

    @Override
    public Integer add(Teacher_db teacherDb) {
        return teacherMapperDb.add(teacherDb);
    }

    @Override
    public Integer update(Teacher_db teacherDb) {
        return teacherMapperDb.update(teacherDb);
    }

    @Override
    public Integer updateDel(Integer tDel, Integer tId) {
        return teacherMapperDb.updateDel(tDel,tId);
    }

    @Override
    public Integer del(Integer tId) {
        return teacherMapperDb.del(tId);
    }
}
